import path from "path";

export default [
    {
        path:"/home",
        name:"Home",
        component:()=>import("../view/Home/index.vue"),
        children:[
            {
                path:"music",
                name:"Music",
                component:()=>import("@/view/Home/components/Music/index.vue")
            },
            {
                path:"new",
                name:"New",
                component:()=>import("@/view/Home/components/News/index.vue"),
                children:[
                   {
                    path:"detail/:type",
                    name:"Detail",
                    component:()=>import("@/view/Home/components/News/Detail/index.vue")
                   }
                ]
            }
        ]
        
    },
    {
        path:"/login",
        name:"Login",
        component:()=>import("../view/Login/index.vue")
    },
    {
        path:"/",
        redirect:"/home"
    },
    //任意路由配置必须放在路由表后面
    {
        path:"/:pathMatch(.*)",
        component:()=>import("../view/NotFound/index.vue")
    }
]